package labox.innovation.gameserver.model.zone;

/**
 * Abstract base class for any zone form
 *
 * @author  durgus
 */
public abstract class L2ZoneForm {
	
	public abstract boolean isInsideZone(int x, int y);

	public abstract boolean intersectsRectangle(int x1, int x2, int y1, int y2);

	public abstract double getDistanceToZone(int x, int y);

	//landing coordinates.

	protected boolean lineSegmentsIntersect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {
		return java.awt.geom.Line2D.linesIntersect(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2);
	}

}
